home *** CD-ROM | disk | FTP | other *** search
- @ECHO OFF
- REM You *MUST* rename CHKDSK.EXE to XCHKDSKX.EXE and put this
- REM batch file on your PATH before you use it.
- IF EXIST TEMP000?.$$$ DEL TEMP000?.$$$
- SET | FIND "windir=" > TEMP0001.$$$
- COPY TEMP0001.$$$ TEMP0002.$$$ > NUL
- DEL TEMP0001.$$$
- IF EXIST TEMP0002.$$$ GOTO YesWindow
- ECHO You're not in Windows, so CHKDSK is fine.
- XCHKDSKX
- GOTO End
- :YesWindow
- DEL TEMP0002.$$$
- ECHO Sorry, it's not safe to run CHKDSK.EXE under Windows.
- ECHO Exit Windows and try it again.
- :End